import request from '@/utils/request'

// 查询成果信息列表
export function listAchievement(query) {
  return request({
    url: '/project/cjl/achievement/list',
    method: 'get',
    params: query
  })
}

// 查询成果信息列表
export function ChalistAchievement(query) {
  return request({
    url: '/project/cjl/achievement/Chalist',
    method: 'get',
    params: query
  })
}

// 查询年份信息列表
export function YearlistAchievement(query) {
  return request({
    url: '/project/cjl/achievement/Yearlist',
    method: 'get',
    params: query
  })
}

// 查询学院信息列表
export function CollegelistAchievement(query) {
  return request({
    url: '/project/cjl/achievement/Collegelist',
    method: 'get',
    params: query
  })
}
export function listAchievement2(a) {
  return request({
    url: '/project/cjl/achievement/list2/'+a,
    method: 'get',
  })
}
// 查询成果通过信息列表
export function admitlistAchievement(query) {
  return request({
    url: '/project/cjl/achievement/admitlist',
    method: 'get',
    params: query
  })
}

// 查询成果信息详细
export function getAchievement(id) {
  return request({
    url: '/project/cjl/achievement/' + id,
    method: 'get'
  })
}

// 新增成果信息
export function addAchievement(data) {
  return request({
    url: '/project/cjl/achievement',
    method: 'post',
    data: data
  })
}
// 修改成果信息
export function updateAchievement(data) {
  return request({
    url: '/project/cjl/achievement',
    method: 'put',
    data: data
  })
}

// 删除成果信息
export function delAchievement(id) {
  return request({
    url: '/project/cjl/achievement/' + id,
    method: 'delete'
  })
}
//  获取用户权限信息
export function getRoleId() {
  return request({
    url: '/project/cjl/achievement/roleId',
    method: 'get'
  })
}

// 审核成果信息
export function aduitAchievement(data) {
  return request({
    url: '/project/cjl/achievement/aduit',
    method: 'put',
    data: data
  })
}

// 签约
export function signTransform(data) {
  return request({
    url: '/project/cjl/achievement/sign',
    method: 'put',
    data: data
  })
}

// 查询签约
export function Checksign() {
  return request({
    url: '/project/cjl/achievement/checksign',
    method: 'get',
  })
}

// 查询认证
export function Cerifica() {
  return request({
    url: '/project/cjl/achievement/cerification',
    method: 'get',
  })
}

// 查询企业或个人
export function Allperson() {
  return request({
    url: '/project/cjl/achievement/allperson',
    method: 'get',
  })
}

// 完善信息后签约
export function Outsign(id) {
  return request({
    url: '/project/cjl/achievement/outsign/'+id,
    method: 'get',
  })
}

// 取消签约
export function Cancellation(id) {
  return request({
    url: '/project/cjl/achievement/Cancellation/'+id,
    method: 'get',
  })
}

// 查询
export function getView(userId) {
  return request({
    url: '/project/cjl/achievement/view/' + userId,
    method: 'get'
  })
}

// 关闭
export function getClose() {
  return request({
    url: '/project/cjl/achievement/close' ,
    method: 'get'
  })
}
